import { createStore } from "vuex";

export default createStore({
  state: {
    list: [
      { title: "vuejs从入门到秃头", id: 0, price: 100 },
      { title: "vuejs从入门到放弃", id: 1, price: 200 },
      { title: "vuejs从入门到大神", id: 2, price: 300 },
    ],
  },
  mutations: {
    remove(state, index) {
      state.list.splice(index, 1);
    },
    //删除一条数据
  },
  actions: {},
  modules: {},
});
